/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class GeomagneticSensor {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010030013';
    }

    get categoryName() {
        return '\u5730\u78c1\u4f20\u611f\u5668';
    }

    getDistance(params) {
        return command({
            method: 'getDistance',
            methodId: 'pUPQ8VO9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getStatus(params) {
        return command({
            method: 'getStatus',
            methodId: 'pGoxHGEM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTimeInterval(params) {
        return command({
            method: 'getTimeInterval',
            methodId: 'pZgRT37n',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDistance(params) {
        return command({
            method: 'setDistance',
            methodId: 'peH3nfYI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTimeInterval(params) {
        return command({
            method: 'setTimeInterval',
            methodId: 'ppAXIONE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default GeomagneticSensor;
